<template>
    <el-aside width="200px"  style="background-color: rgb(238, 241, 246) ;height:100%">
      <el-menu :default-openeds="['1', '3']">
        <el-submenu index="2">
          <template slot="title"><i class="el-icon-menu"></i>操作</template>
          <el-menu-item-group>
            <el-menu-item index="2-0"@click="$router.push('/questionlist')">工单详情</el-menu-item>
            <el-menu-item index="2-1" @click="$router.push('/addquestion')">添加问题</el-menu-item>
            <el-menu-item index="2-2" @click="Logout">退出系统</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
      </el-menu>
    </el-aside>

</template>

<script>
    export default {
        name: "Header",
        data(){
            return{
                isService:0
            }
        },
        created() {
            let isService=sessionStorage.getItem("isService")
            this.isService=isService
        },
        methods:{
            Logout(){
                sessionStorage.clear();
                this.$router.push('/login');
            }
        }
    }
</script>

<style scoped>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>
